Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

catharsis

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catharsis

A JavaScript parser for Google Closure Compiler and JSDoc type expressions.

  • 0.7.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
663K
decreased by-63.48%
Maintainers
1
Weekly downloads
 
Created

What is catharsis?

The catharsis npm package is a JavaScript library for parsing and stringifying JSDoc type expressions. It allows developers to convert JSDoc type expressions into JavaScript objects and vice versa, making it easier to work with type annotations in code documentation.

What are catharsis's main functionalities?

Parsing JSDoc Type Expressions

This feature allows you to parse JSDoc type expressions into JavaScript objects. The example code parses the JSDoc type expression 'Array.<string>' and converts it into a JavaScript object.

const catharsis = require('catharsis');
const parsedType = catharsis.parse('Array.<string>');
console.log(parsedType);

Stringifying JSDoc Type Expressions

This feature allows you to convert JavaScript objects back into JSDoc type expressions. The example code takes a JavaScript object representing a type and converts it into a JSDoc type expression string.

const catharsis = require('catharsis');
const typeObj = { type: 'NameExpression', name: 'string' };
const typeString = catharsis.stringify(typeObj);
console.log(typeString);

Other packages similar to catharsis

FAQs

Package last updated on 05 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc